/**
 * 记录按钮的点击次数
 * 方便了解哪些按钮比较常用，以根据使用频率调整工具栏显示次序
 */
(function(E, $){

var Consts = E.consts,
	Event = E.mod("Event"),
	clickCount = {};

Event.bind("onafteraction", function ( e ){
	var name = e.Plugin.name;
	clickCount[name] ? clickCount[name] +=1 : clickCount[name]=1;
	E.log("run", name+"被点击了"+ clickCount[name] +"次");
});

E.plugin('ClickCount', {
	get: function(){
		return ClickCount;
	}
});

})(jQEditor, jQuery);